package com.link.play.fit.ai.utils

// 统一错误处理
sealed class ApiResult<out T> {
    data class Success<out T>(val data: T) : ApiResult<T>()
    data class BusinessError(
        val status: Int,    // 业务状态码
        val message: String // 业务错误信息
    ) : ApiResult<Nothing>()

    data class HttpError(
        val code: Int,     // HTTP状态码
        val message: String
    ) : ApiResult<Nothing>()

    object NetworkError : ApiResult<Nothing>() // 网络异常

}